PRB7: Kangaroo Joey! // Beginner

 
Kangaroo Joey is having trouble with a coding problem assigned to him by Senpai Koala and requires your help. The problem is as follows:

Say that a "clump" in an array is a series of 2 or more adjacent elements of the same value. Return the number of clumps in the given array.

Input Format

The elements of the array on a single line separated by commas.

Sample Input

1, 2, 2, 3, 4, 4

Output Format

The number of clumps in the given array.

Sample Output

2




You must be logged in to submit a solution.